<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<ul id="show"></ul>
<script>

  new Promise((resolve, reject) => {
    console.log(1);//同步
    resolve();
  }).then(res => console.log(2, '异步的微任务'));//异步的微任务
  setTimeout(() => {
    console.log(3, '异步的宏任务');
  }, 0);

  // 渲染操作 页面 : GUI渲染
  let oLi = document.createElement('li');
  for (let i = 0; i < 100; i++) {
    oLi.innerHTML = i;
    show.appendChild(oLi);
    console.log('insert', i);
  }
  // let a = '';
  // ajax({}).then(res => a = res);
  // console.log(a)

</script>
</body>
</html>
